<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								订单号：<input type="text" name="orderCode"/>
							</li>

							<li>
								工序编号：<input type="text" name="opCode"/>
							</li>

							<li>
								工艺路线名称：<input type="text" name="routeName"/>
							</li>

							<li>
								项目编码：<input type="text" name="projectCode"/>
							</li>

							<li>
								工艺路线编号：<input type="text" name="routeId"/>
							</li>

							<li>
								工位编号：<input type="text" name="workstationCode"/>
							</li>

							<li>
								工位配送物料编码：<input type="text" name="matId"/>
							</li>

							<li>
								物料名称：<input type="text" name="matName"/>
							</li>

							<li>
								工位配送物料数量：<input type="text" name="matNum"/>
							</li>

							<li>
								备注：<input type="text" name="remark"/>
							</li>

							<li>
								标志位：<input type="text" name="flag"/>
							</li>

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:mesBomCgzx:add">
					<i class="fa fa-plus"></i> 添加
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:mesBomCgzx:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:mesBomCgzx:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:mesBomCgzx:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:mesBomCgzx:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:mesBomCgzx:remove')}]];
        var prefix = ctx + "system/mesBomCgzx";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "城轨轴箱订单bom ",
				search: false,
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'gid', 
					title : '${column.columnComment}',
					visible: false
				},
				{
					field : 'orderCode', 
					title : '订单号',
					sortable: true
				},
				{
					field : 'opCode', 
					title : '工序编号',
					sortable: true
				},
				{
					field : 'routeName', 
					title : '工艺路线名称',
					sortable: true
				},
				{
					field : 'projectCode', 
					title : '项目编码',
					sortable: true
				},
				{
					field : 'routeId', 
					title : '工艺路线编号',
					sortable: true
				},
				{
					field : 'workstationCode', 
					title : '工位编号',
					sortable: true
				},
				{
					field : 'matId', 
					title : '工位配送物料编码',
					sortable: true
				},
				{
					field : 'matName', 
					title : '物料名称',
					sortable: true
				},
				{
					field : 'matNum', 
					title : '工位配送物料数量',
					sortable: true
				},
				{
					field : 'remark', 
					title : '备注',
					sortable: true
				},
				{
					field : 'flag', 
					title : '标志位',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.gid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.gid + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>